/**
 * Created by ls.c on 2016/11/3.
 */

export const START_LOADING = 'START_LOADING'
export const FINISH_LOADING = 'FINISH_LOADING'
export const FETCH_NAVSTATUS_SUCCESS = 'FETCH_NAVSTATUS_SUCCESS'
export const FETCH_RESULT_MSG = 'FETCH_RESULT_MSG'


const mutations = {

	// 开始加载动画
	[START_LOADING] (state) {
		state.loading = true
	},
	// 结束加载动画
	[FINISH_LOADING] (state) {
		state.loading = false
	},
	// 获取导航状态
	[FETCH_NAVSTATUS_SUCCESS] (state, isActive) {
		state.navStatus = isActive
	},
	// 获取操作返回信息
	[FETCH_RESULT_MSG] (state, data) {
		state.resultMsg = data
	}
}

export default mutations